export type PathId = { $id: number };
export type PathBatchId = { $ids: string };
export type QueryPage = { page: number };
export type QuerySize = { size: number };
export type QueryKeywords = { keywords?: string };

export interface File {
    id?: number;
    path?: string;
    fullPath?: string;
    size?: number;
    extname?: string;
    mime?: string;
}

export interface User {
    id?: number;
    username?: string;
    email?: string;
    phone?: string;
    name?: string;
    sex?: number;
    remark?: string;
    avatar?: File;
}

export interface Role {
    id?: number;
    name?: string;
    remark?: string;
}

export interface Permission {
    id?: number;
    name?: string;
    remark?: string;
}

export interface Roles {
    roles?: Role[];
}

export interface Permissions {
    permissions?: Permission[];
}

export interface LcPage {
    id?: number;
    type?: number;
    title?: string;
    remark?: string;
    status?: number;
    reason?: string;
    blocks?: string;
}

export type AuthLoginRequest = { username: string; password: string; };
export type AuthLoginResponse = { token: string; user: User; };
export type AuthRegisterRequest = { username: string; password: string; email?: string; phone?: string; };
export type AuthRegisterResponse = boolean;
export type AuthProfileResponse = (User & Roles & Permissions);
export type CreateUserRequest = User;
export type CreateUserResponse = User;
export type GetUserByIdRequest = PathId;
export type GetUserByIdResponse = User;
export type UpdateUserRequest = PathId & User;
export type UpdateUserResponse = User;
export type PatchUserRequest = PathId & User;
export type PatchUserResponse = User;
export type DeleteUserByIdRequest = PathId;
export type DeleteUserByIdResponse = boolean;
export type GetUserListByPageRequest = QueryPage & QuerySize & QueryKeywords;
export type GetUserListByPageResponse = { data?: User[]; total?: number; };
export type CreateRoleRequest = Role;
export type CreateRoleResponse = Role;
export type GetRoleByIdRequest = PathId;
export type GetRoleByIdResponse = Role;
export type UpdateRoleRequest = PathId & Role;
export type UpdateRoleResponse = Role;
export type PatchRoleRequest = PathId & Role;
export type PatchRoleResponse = Role;
export type DeleteRoleByIdRequest = PathId;
export type DeleteRoleByIdResponse = boolean;
export type GetRoleListByPageRequest = QueryPage & QuerySize & QueryKeywords;
export type GetRoleListByPageResponse = { data?: Role[]; total?: number; };
export type CreatePermissionRequest = Permission;
export type CreatePermissionResponse = Permission;
export type GetPermissionByIdRequest = PathId;
export type GetPermissionByIdResponse = Permission;
export type UpdatePermissionRequest = PathId & Permission;
export type UpdatePermissionResponse = Permission;
export type PatchPermissionRequest = PathId & Permission;
export type PatchPermissionResponse = Permission;
export type DeletePermissionByIdRequest = PathId;
export type DeletePermissionByIdResponse = boolean;
export type GetPermissionListByPageRequest = QueryPage & QuerySize & QueryKeywords;
export type GetPermissionListByPageResponse = { data?: Permission[]; total?: number; };
export type CreateLcPageRequest = LcPage;
export type CreateLcPageResponse = LcPage;
export type GetLcPageByIdRequest = PathId;
export type GetLcPageByIdResponse = LcPage;
export type UpdateLcPageRequest = PathId & LcPage;
export type UpdateLcPageResponse = LcPage;
export type PatchLcPageRequest = PathId & LcPage;
export type PatchLcPageResponse = LcPage;
export type DeleteLcPageByIdRequest = PathId;
export type DeleteLcPageByIdResponse = boolean;
export type GetLcPageListByPageRequest = QueryPage & QuerySize & QueryKeywords;
export type GetLcPageListByPageResponse = { data?: LcPage[]; total?: number; };
export type GetOssSignatureResponse = { accessKeyId: string; policy: string; signature: string; host: string; expire: number; file: File; };

export interface Response<T> {
    status: boolean;
    code: number;
    message: string;
    data?: T;
}
